package day04;
import java.util.Scanner;//导入一个扫描仪
public class ScannerDemo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);//创建一个新的扫描仪
        System.out.println("请输入年龄:");
        int age = scan.nextInt();//扫描一个整数并赋值给age
        System.out.println("请输入商品价格:");
        double price = scan.nextDouble();
        System.out.println("年龄为:"+age+"岁,价格为:"+price+"元");
    }
}
